<template>
<div class="search-container" v-loading="loading">
    <el-form :value="searchParams" inline="true" >
      <el-form-item  v-for="(item, index) in searchParams.items" :key="index" :label="item.cnname">
        <el-select  v-if="item.disabled != false && item.itemType === 'DICT'" v-model="item.value" :multiple = "item.mutSelect ==='checkBox'">
          <el-option  v-for="(itemChild, itemIndex) in item.dict" :key="itemIndex"  :label="itemChild.value" :value="itemChild.key" />
        </el-select>
        <el-input v-else-if="item.itemType !== 'DATE'" v-model="item.value"></el-input>
        <el-col :span="24" v-else>
          <el-form-item>
            <el-date-picker
              v-model="item.value"
              type="date"
              label="Pick a date"
              placeholder="Pick a date"
              style="width: 100%"
            />
          </el-form-item>
        </el-col>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="onSubmit">查询</el-button>
        <el-button @click="onReset">重置</el-button>
        <el-button @click="importDatas">导入</el-button>
        <el-button @click="exportDatas">导出</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script setup>
import { defineProps, ref } from 'vue'
defineProps({
  searchParams: {
    type: Array,
    required: true,
    default: () => []
  },
  tableDates: {
    type: Array,
    required: true,
    default: () => []
  }
})

const searchParamsRef = ref({})

const submitForm = () => {
}

const resetForm = () => {
}

const importDatas = () => {
}

const exportDatas = () => {
}
</script>

<style lang="scss" scoped>

</style>
